// 短链接相关数据模型

// 短链接信息
export interface ShortLink {
    id: string
    name: string
    shortUrl: string
    originalUrl: string
    favicon: string
    groupId: string
    createdAt: string
    todayVisits: number
    totalVisits: number
    todayVisitors: number
    totalVisitors: number
    todayIPs: number
    totalIPs: number
}

// 短链接分组
export interface LinkGroup {
    groupId: string
    name: string
    description?: string
    createdAt: string
    shortLinkCount: number
}

// 获取短链接列表请求参数
export interface GetShortLinksParams {
    groupId: string
    pageNum?: number
    pageSize?: number
    keyword?: string
}

// 用户域名信息
export interface UserDomain {
    domainId: string
    name: string
    domain: string
    isDefault: boolean
    createdAt: string
}

// 创建短链接请求参数
export interface CreateShortLinkParams {
    name: string
    originalUrl: string
    groupId: string
    domainId: string
    validityType?: 'permanent' | 'custom'
    expiryDate?: string | null
    limitType?: 'unlimited' | 'custom'
    visitLimit?: number | null
}

// 创建分组请求参数
export interface CreateGroupParams {
    name: string
    description?: string
}
